package com.walming.generator.support.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.walming.generator.copycat.annotaion.Eq;
import com.walming.generator.copycat.annotaion.Like;
import com.walming.generator.copycat.annotaion.Time;
import com.walming.generator.copycat.enums.CompareEnum;
import com.walming.generator.copycat.enums.TimeQueryFormat;
import com.walming.generator.copycat.extend.AbstractQuery;
import com.walming.generator.support.domain.SysConfig;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 系统配置相关
 *
 * @author walming
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "SysConfig", description = "系统配置相关")
public class SysConfigQuery extends AbstractQuery<SysConfig> {

    @Eq
    @ApiModelProperty("参数主键")
    private Long configId;

    @Like
    @ApiModelProperty("参数名称")
    private String configName;

    @Eq
    @ApiModelProperty("参数键名")
    private String configKey;

    @Like
    @ApiModelProperty("参数键值")
    private String configValue;

    @Eq
    @ApiModelProperty("系统内置（Y是 N否）")
    private String configType;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Time(alias = "create_time", compare = CompareEnum.GE, format = TimeQueryFormat.DAY_BEGIN)
    @ApiModelProperty(value = "开始时间段", position = 10)
    private Date beginTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Time(alias = "create_time", compare = CompareEnum.LE, format = TimeQueryFormat.DAY_END)
    @ApiModelProperty(value = "结束时间段", position = 11)
    private Date endTime;

}
